package com.interpreter.iface.impl;

import com.interpreter.iface.Expression;

public class TerminalExpression implements Expression {

    private String keywords;

    public TerminalExpression(String keywords) {
        this.keywords = keywords;
    }

    @Override
    public boolean interpret(String context) {
        if ( context == null || "".equals(context) )
            return false;  // 鲁棒性
        if ( context.contains(keywords) )
            return true;
        return false;
    }
}
